package server;

import java.io.IOException;

public abstract class HttpServlet implements Servlet{
    public abstract void doGet(Request request,Response response);
    public abstract void doPost(Request request,Response response);
    @Override
    public void service(Request request, Response response) throws Exception {
        if("GET".equalsIgnoreCase(request.getMethod())){
            this.doGet(request,response);
        }else{
            this.doPost(request,response);
        }
    }

}
